<?php
class m_jawaban extends CI_Model
{
	public $table = 'jawaban';
	
	function get_soal_by_soal($id){
		$this->db->select('*');
		$this->db -> from($this->table);
		$this -> db -> where('so_id', $id);
	
		$query = $this->db->get();
	
		return $query->result_array();
	}
	
	function get_data_in($where){
		$this->db->select('*');
		$this->db->from($this->table);
		$this->db->where_in('ja_id', $where);
		$this->db->order_by('ja_id', 'asc');
	
		$query = $this->db->get();
	
		return $query->result_array();
	}
	
	function insert($value){
		$this->db->insert($this->table, $value);
	}
	
	function update($value, $where){
		return $this->db->update($this->table, $value, $where);
	}
	
	function delete($where){
		return $this->db->delete($this->table, $where);
	}
}
?>